#!/bin/bash

echo "Running all tests..."

rm -rf phpunit-coverage
mkdir  phpunit-coverage

cp Tests-API/*Test.php Tests-All/.
cp Tests-Code/*Test.php Tests-All/.

phpunit \
       --coverage-html phpunit-coverage \
       --testdox-html phpunit.testdox.html \
       --log-tap phpunit.coverage.tap \
       --verbose \
       Tests-All > phpunit.coverage.out 2> phpunit.coverage.err

echo "Running all tests... Complete."
ls -ltr /www/default/logs/* phpunit.tap.txt out/* debug.out
echo vi phpunit.coverage.tap out/* debug.out
head -n 15 phpunit.err

exit

